# CMake lowest version requirement
cmake_minimum_required(VERSION 3.5.1)

# project information
project(detect)


# set ascend path
set(ToolChainRoot "/usr/local/Ascend/ascend-toolkit/latest") #   /usr/local/Ascend/ascend-toolkit/latest
set(ToolChainLib ${ToolChainRoot}/lib64)
set(TooChainInclude ${ToolChainRoot}/include)

# set compiler
add_compile_options(-std=c++11)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_COMPILER g++)


set(CMAKE_RUNTIME_OUTPUT_DIRECTORY  ${CMAKE_SOURCE_DIR}/out)
set(CMAKE_CXX_FLAGS_DEBUG "-fPIC -O0 -g -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "-fPIC -O2 -Wall")



# add global include
include_directories(${TooChainInclude})
link_directories(${ToolChainLib})

# set output path
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/out)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/out)




add_definitions(-DENABLE_DVPP_INTERFACE)


# 指定生成目标
add_executable(demo demo.cpp DVPP_VPC.cpp)

target_link_libraries(demo ascendcl acl_dvpp stdc++ dl rt)